package com.sjp.entity;

import java.util.Random;

public class Layer {
  //有多行
          private Integer rowNum;
  //有多少列
          private Integer colNum;
  //当前图层的容量 牌的多少
          private Integer capacity;
  //目前图层有多少张牌
          private Integer size;
  //定义一个容器
          private Cell [][] cells;

          private Integer offsetx;
          private Integer offsety;

          private Layer parent;


  //定义一个构造方法
          public Layer( Integer rowNum,Integer colNum){
              this.rowNum =rowNum;
              this.colNum =colNum;
              //设置最大容量
              this.capacity =this.rowNum*this.colNum;
                //设置数组
                this.cells =new Cell[this.rowNum][this.colNum];
                this.size=0;

                this.offsetx=new Random().nextInt(100);
                this.offsety=new Random().nextInt(100);
  }
  //生成set get 方法
          public Integer getRowNum() {
    return rowNum;
  }
  public void setRowNum(Integer rowNum) {
    this.rowNum = rowNum;


  }
  public Integer getColNum() {
    return colNum;
  }
  public void setColNum(Integer colNum) {
    this.colNum = colNum;
  }
  public Integer getCapacity() {
    return capacity;
  }
  public void setCapacity(Integer capacity) {
    this.capacity = capacity;
  }
  public Integer getSize() {
    return size;
  }
  public void setSize(Integer size) {
    this.size = size;
  }
  public Cell[][] getCells() {
    return cells;
  }
  public void setCells(Cell[][] cells) {
    this.cells = cells;
  }

  public Integer getOffsetx() {
    return offsetx;
  }

  public void setOffsetx(Integer offsetx) {
    this.offsetx = offsetx;
  }

  public Integer getOffsety() {
    return offsety;
  }

  public void setOffsety(Integer offsety) {
    this.offsety = offsety;
  }

  public Layer getParent() {
    return parent;
  }

  public void setParent(Layer parent) {
    this.parent = parent;
  }
}
